import axios from '@/util/request.js'

/**
 *  GET/栏目
 *  标题
 *  https://jk.hzhuanen.top/a/news.list?version=3
 */ 

const ApiPath = {
    MENUTABS : 'https://jk.hzhuanen.top/a/news.list?version=3',
    LISTDATA : 'https://jk.hzhuanen.top/a/news.html',
    DETAILINFO :'https://jk.hzhuanen.top/a/news-d162089b3d34fc761219449bd71263c6.html',
    MORELISTDATA : 'https://jk.hzhuanen.top/a/news.html'

};

export const getMemuTabs = async () => {
    const res = await axios.get(ApiPath.MENUTABS);
    return res;
};

// type 类型 
export const getListData = async (type) => {
    const res = await axios.get(ApiPath.LISTDATA,{
        params : {
            type,
        }
    });
    return res;
}


export const getDetail = async (id,tpl,type) => {
    const res = await axios.get(ApiPath.DETAILINFO,{
        params : {
            id,
            tpl,
            type
        }
    });
    return res;
}

export const getMoreListData = async (type,beforeId) => {
    const res = await axios.get(ApiPath.MORELISTDATA,{
        params : {
            type,
            beforeId,
        }
    });
    return res;
}



